#@weiXinLayout("私人订制")

#define weiXinMain()
#@navBar("私人订制",contextPath+"/weixin/")
<div class="weui-cells__title">联系人</div>
<div class="weui-cells">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <input class="weui-input" id="name" type="text" placeholder="请输入联系人...">
        </div>
    </div>
</div>
<div class="weui-cells__title">联系电话</div>
<div class="weui-cells">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <input class="weui-input" id="mobile" type="text" placeholder="请输入联系电话...">
        </div>
    </div>
</div>

<div class="weui-cells__title">定制内容</div>
<div class="weui-cells weui-cells_form">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <textarea class="weui-textarea" id="content" placeholder="如：我们一行10个人，想纯玩不消费，需要当地2位导游...." rows="3"></textarea>
        </div>
    </div>
</div>
<div class="button-padding">
    <a href="javascript:;" id="submitBtn" class="weui-btn weui-btn_primary">点我提交定制需求</a>
</div>
#end

#define weiXinCss()
#end

#define weiXinJs()
<script>
    $(document).ready(function(){
        $("#submitBtn").click(function(){
            $.confirm({
                "title":"系统提示",
                "text":"确定要进行当前操作么？",
                "onOK":function(){
                    var config ={
                        "url":"#(contextPath)/weixin/doAddPerson",
                        "data":{
                            "name":$("#name").val(),
                            "mobile":$("#mobile").val(),
                            "content":$("#content").val(),
                        },
                        "successCallBack":function(resp){
                            if(resp.result){
                                $.alert(resp.data,function(){
                                    window.location.href="#(contextPath)/weixin"
                                });
                            }else{
                                $.alert(resp.data);
                            }
                        }
                    };
                    var ajax = new AjaxUtils(config);
                    ajax.executeRequest();
                }
            })
        });
    })
</script>
#end